Logo

3.3 Applying SQP Algorithm

Parameter estimation is carried out in the Matlab environment by using the built-in quadratic programming solver, quadprog. The algorithm is described below: (Bonnans et al., 2006, 257)

  1. Set up initial value of $\left( \boldsymbol{{\gamma}_{0}},\boldsymbol{{\lambda}_{0}} \right)$, and compute ${{c}_{I}}\left( \boldsymbol{{\gamma}_{0}} \right)$, $\nabla f{\left( \boldsymbol{{\gamma}_{0}} \right)}$, and ${{A}_{I}}\left( \boldsymbol{{\gamma}_{0}}\right)$. Set the iteration index $k=0$.
  2. Stop and report $\left( \boldsymbol{{\gamma}_{k}},\boldsymbol{{\lambda }^{QP}} \right)$ as the optimal solution if the KKT conditions (3.2) are satisfied.
  3. Solve the QP problem (3.4) by computing the Hessian matrix of the Lagrangian $L\left( \boldsymbol{{\gamma }_{k}},\boldsymbol{{\lambda }_{k}} \right)$ and derive $d_{k}$ with Matlab function quadprog.
  4. Solve the Lagrange multiplier $\boldsymbol{{\lambda }^{QP}}$ by the first equation in (3.3), $\boldsymbol{{\lambda }^{QP}}={{\left( {\boldsymbol{{A}_{k}}}^{T} \right)}^{-1}}\left( -\nabla \boldsymbol{{f}_{k}}-\boldsymbol{{{L}_{k}}d} \right)$.
  5. Set the new solution of the $k+1$ iteration as $\boldsymbol{{\gamma }_{k+1}}=\boldsymbol{{\gamma }_{k}} +\boldsymbol{{d}_{k}}$ and $\boldsymbol{{\lambda }_{k+1}}=\boldsymbol{{\lambda }^{QP}}$.
  6. Compute ${{c}_{I}}\left( \boldsymbol{{\gamma}_{k+1}} \right)$, $\nabla f{\left( \boldsymbol{{\gamma}_{k+1}} \right)}$, and ${{A}_{I}}\left( \boldsymbol{{\gamma}_{k+1}}\right)$. Go back to the step 2 and set $k=k+1$.

We can directly compute the gradient vector $\nabla f{\left( \boldsymbol{\gamma} \right)}$ and the Lagrangian Hessian matrix $L\left( \boldsymbol{{\gamma }_{k}},\boldsymbol{{\lambda }_{k}} \right)$. The initial value is set to the parameter estimates of the truncated regression model without boundary constraints by the Stata truncreg command.11 (Cong, 2000)

____________________

Footnote

11 Regarding numerical issues and technical model information, please consult with the supplementary materials.

Download [full paper] [supplementary materials] [all replication files] [technical note]